﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fast.Framework.Models;

namespace Fast.Framework.Interfaces
{

    /// <summary>
    /// 大数据接口类
    /// </summary>
    /// <typeparam name="TDbOptions"></typeparam>
    public interface IBigData<TDbOptions> where TDbOptions : DbOptions
    {

        /// <summary>
        /// 批量复制
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="source">源</param>
        /// <param name="tableName">表名称</param>
        /// <param name="bulkCopyTimeout">批量复制超时 单位秒</param>
        /// <returns></returns>
        Task<int> BulkCopyAsync<T>(IEnumerable<T> source, string tableName = "", int bulkCopyTimeout = 120) where T : class;
    }
}
